/*
 * key.c
 *
 *  Created on: May 11, 2023
 *      Author: zhulijun
 */

#include "my_inc.h"


void key(void)
{
	if(HAL_GPIO_ReadPin(KEY1_GPIO_Port, KEY1_Pin) == GPIO_PIN_RESET)
	{
		led.led_on(led_b);
	}

	if(HAL_GPIO_ReadPin(KEY2_GPIO_Port, KEY2_Pin) == GPIO_PIN_RESET)
	{
		led.led_on(led_g);
		//led.led_on(led_r);
	}

	if(HAL_GPIO_ReadPin(KEY3_GPIO_Port, KEY3_Pin) == GPIO_PIN_RESET)
	{
		led.led_flow();
	}
}


